package controllers;

import models.MenuItem;
import play.cache.Cache;
import play.mvc.Before;
import play.mvc.With;

/**
 * Created by IntelliJ IDEA.
 * User: Cyril
 * Date: 13.08.11
 * Time: 21:58
 * To change this template use File | Settings | File Templates.
 */
@With(controllers.CustomSecure.class)
@Check("admin")
@CRUD.For(MenuItem.class)
public class MenuEditor extends controllers.CRUD {

    @Before
    public static void cleanMenu() throws Throwable {
        Cache.delete("mainMenu");
        Cache.delete(MenuBuilder.getMenuCacheName());
        controllers.CRUD.addType();
    }

}
